package com.lijie.ljblog.model.vo;

import com.lijie.ljblog.enums.ChessColorEnum;
import lombok.Data;

/**
 * @Description 联机五子棋相应类
 * @Author lijie
 * @Date 2022/10/26 15:14
 **/
@Data
public class GamePVPGoPangResponseVO {
    private boolean ok = true;
    /**
     * 操作类型
     */
    private String reason ;
    /**
     * 信息
     */
    private String message ;


    private int x;
    private int y;
    /**
     * 胜者Id
     */
    private int winnerUserId;

    private int color;

    private boolean over;

    public GamePVPGoPangResponseVO(int x, int y, ChessColorEnum colorEnum){
        this.x=x;
        this.y=y;
        this.color=colorEnum.getVal();
    }

    public GamePVPGoPangResponseVO(){

    }
    public void error(String message){
        this.message=message;
        this.ok=false;
    }
    public void success(String reason,String message){
        this.message=message;
        this.reason=reason;
        this.ok=true;
    }

}
